/**
 * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.monitor.videodetection.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.service.TreeService;
import com.jeeplus.common.utils.StringUtils;
import com.jeeplus.modules.monitor.videodetection.entity.MonitorVideoDetectionMain;
import com.jeeplus.modules.monitor.videodetection.mapper.MonitorVideoDetectionMainMapper;

/**
 * 视频检测Service
 * @author 刘明星
 * @version 2020-12-11
 */
@Service
@Transactional(readOnly = true)
public class MonitorVideoDetectionMainService extends TreeService<MonitorVideoDetectionMainMapper, MonitorVideoDetectionMain> {

	public MonitorVideoDetectionMain get(String id) {
		return super.get(id);
	}
	
	public List<MonitorVideoDetectionMain> findList(MonitorVideoDetectionMain monitorVideoDetectionMain) {
		if (StringUtils.isNotBlank(monitorVideoDetectionMain.getParentIds())){
			monitorVideoDetectionMain.setParentIds(","+monitorVideoDetectionMain.getParentIds()+",");
		}
		return super.findList(monitorVideoDetectionMain);
	}
	
	@Transactional(readOnly = false)
	public void save(MonitorVideoDetectionMain monitorVideoDetectionMain) {
		super.save(monitorVideoDetectionMain);
	}
	
	@Transactional(readOnly = false)
	public void delete(MonitorVideoDetectionMain monitorVideoDetectionMain) {
		super.delete(monitorVideoDetectionMain);
	}
	
}